import request from '@/utils/request'
// -------- 员工管理 --------

let BASE_ADDRESS = '/base/employee'

// 新增 add 员工
export const getAddEmployee = (data) => {
  return request({
    url: `${BASE_ADDRESS}/add`,
    method: 'POST',
    data
  })
}


// 分页查询
export const getEmployeeList = (data) => {
  return request({
    url: `${BASE_ADDRESS}/list`,
    method: 'get',
    params: data
  })
}
//edit
export const getEditEmployee = (data) => {
  return request({
    url: `${BASE_ADDRESS}/edit`,
    method: 'put',
    data
  })
}

// id查询
export const getEmployeeInfo = (data) => {
  return request({
    url: `${BASE_ADDRESS}/getInfo`,
    method: 'get',
    params: data
  })
}
// 通过员工id查询 所有的角色
export const getPositionId = (data) => {
  return request({
    url: `${BASE_ADDRESS}/getPositionId/${data}`,
    method: 'get',
  })
}
// 删除
export const getDeleteEmployee = (data) => {
  return request({
    url: `${BASE_ADDRESS}/remove/${data}`,
    method: 'delete',
  })
}